<template>
  <el-avatar :size="size" :src="src">
    <img
      src="https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"
    />
  </el-avatar>
</template>

<script setup name="Avatar" lang="ts">
//接受父组件传递过来的参数
defineProps({
  size: {
    type: Number,
    default: 40,
  },
  src: {
    type: String,
  },
})
</script>

<style lang="scss" scoped></style>
